;inskrypcja menu ;autor: dave2x ;wersja 1.3 ;opis InitEvents ;------------------USTAWIENIA---------------; ;ustaw jaki krag chcesz pisac %krag(1-8) set %krag N/A ;ustaw ktory czar chcesz pisac %czar(1-8) set %czar N/A ;ustaw ile zwoi ma robic %ile (od 1 do np 60) ;tylko wartosci dodatnie i calkowite set %ile 1 ;ustaw sciezke dostepu do pliku *.wav, ktory ma byc ;uruchamiany, gdy napisze wymagana liczbe zwoji. np. d:\wav\well_done.wav ;uwaga, odtwarza tylko pliki z rozszerzeniem typu wav set %koniecwav well_done.wav ;-----------------KONIEC USTAWIEN-----------; set %v v1.3 set %low 10 set %hi 1000 set %uhi 2000 set %akcja sprawdz set %main #true set %stworzyl 0 set %zniszczyl 0 set %medyt 0 set %pile 0 set %tempkrag N/A set %tempczar N/A ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gosub menu while %main = #true { gosub smenu gosub krag gosub czar gosub pisz gosub journal } halt ;====================================menu============================== sub menu set %windowx 180 set %windowy 250 set %przycisky %windowy - 40 set %pprzyciskx %windowx - 60 - 20 set %pprzycisky %przycisky set %statusx %windowx / 2 - 30 set %statusy %ramkay - 20 set %infoy %ramkay + 10 ;menu hide menu clear menu window size %windowx %windowy gosub czstandard menu window color btnface menu window title skryba %v gosub przycisksprawdz gosub przyciskwyjscie menu hideeuo menu show return sub smenu if #menubutton = SPRAWDZ { set #menubutton gosub przyciskstart gosub przyciskstop gosub sprawdz raz } if #menubutton = START { set #menubutton gosub przyciskpause gosub przyciskstop gosub start } if #menubutton = STOP { set #menubutton gosub przycisksprawdz gosub przyciskwyjscie gosub stop } if #menubutton = PAUSE { set #menubutton gosub przycisksprawdz gosub pause } if #menubutton = WYJSCIE { set #menubutton gosub czstandard menu hide menu clear set %main #false } menu get krag set %tempkrag #menures if %tempkrag = N/A || %tempkrag = 0 return if %tempkrag <> %krag { set %krag %tempkrag gosub combo_czar } menu get czar set %tempczar #menures if %tempczar = N/A || %tempczar = 0 return if %tempczar <> %czar set %czar %tempczar return sub czstandard menu font name verdana menu font size 10 menu font style r menu font color black menu font bgcolor white return sub czred menu font name verdana menu font size 10 menu font style r menu font color red menu font bgcolor white return sub czgreen menu font name verdana menu font size 10 menu font style r menu font color green menu font bgcolor white return sub czcionka ; nazwa, rozmiar, kolor, bgcolor, styl, wyrownanie menu font style %5 menu font name %1 menu font size %2 menu font color %3 menu font bgcolor %4 menu font align %6 return sub przyciskstop gosub czcionka verdana 10 red white r center menu delete wyjscie menu delete stop menu button stop %pprzyciskx %przycisky 70 30 STOP return sub przyciskstart gosub czcionka verdana 10 green white r center menu delete sprawdz menu delete pause menu button start 10 %przycisky 70 30 START return sub przycisksprawdz gosub czcionka verdana 10 green white r center menu delete pause menu delete start menu button sprawdz 10 %przycisky 70 30 SPRAWDZ return sub przyciskpause gosub czcionka verdana 10 green white r center menu delete start menu button pause 10 %przycisky 70 30 PAUSE return sub przyciskwyjscie menu font color black menu font bgcolor white menu button wyjscie %pprzyciskx %pprzycisky 70 30 WYJSCIE return sub combo_krag menu delete krag set %kcombo 0 gosub czstandard menu text tkrag 5 10 KRAG: gosub combo KRAG 60 5 110 %krag I II III IV V VI VII VIII return sub combo_czar menu delete czar set %ccombo 0 gosub czstandard if %krag <> 0 menu text tczar 5 30 CZAR: if %krag = 1 gosub combo CZAR 60 30 110 %czar Clumsy CreateFood Feeblemind Heal MagicArrow NightSight ReactiveArmor Weaken if %krag = 2 gosub combo CZAR 60 30 110 %czar Agility Cunning Cure Harm MagicTrap MagicUntrap Protection Strength if %krag = 3 gosub combo CZAR 60 30 110 %czar Bless Fireball MagicLock Poison Telekinesis Teleport Unlock WallOfStone if %krag = 4 gosub combo CZAR 60 30 110 %czar ArchCure ArchProtection Curse FireField GreaterHeal Lightning ManaDrain Recall if %krag = 5 gosub combo CZAR 60 30 110 %czar BladeSpirit DispelField Incognito SpellReflection MindBlast Paralyze PoisonField SummonCreature if %krag = 6 gosub combo CZAR 60 30 110 %czar Dispel EnergyBolt Explosion Invisibility Mark MassCurse ParalyzeField Reveal if %krag = 7 gosub combo CZAR 60 30 110 %czar ChainLightning EnergyField FlameStrike GateTravel ManaVampire MassDispel MeteorSwarm Polymorph if %krag = 8 gosub combo CZAR 60 30 110 %czar Earthquake EnergyVortex Resurrection AirElemental SummonDaemon EarthElemental FireElemental WaterElemental return sub combo ;funkcja uniwersalnego combo set %c %0 - 4 set %j 6 menu combo create %1 %2 %3 %4 for %i 6 %0 { menu combo add %1 % . %i if %1 = KRAG { set %kcombo %kcombo + 1 set %nkrag . %kcombo % . %i } if %1 = CZAR { set %ccombo %ccombo + 1 set %nczar . %ccombo % . %i } } menu combo select %1 %5 menu activate %1 return ;=================================================== sub krag if %akcja <> krag || %main <> #true return if %krag = 1 { set %x 100 set %y 100 } if %krag = 2 { set %x 130 set %y 100 } if %krag = 3 { set %x 160 set %y 100 } if %krag = 4 { set %x 190 set %y 100 } if %krag = 5 { set %x 210 set %y 100 } if %krag = 6 { set %x 240 set %y 100 } if %krag = 7 { set %x 270 set %y 100 } if %krag = 8 { set %x 300 set %y 100 } set %akcja czar return sub czar if %akcja <> czar || %main <> #true return if %czar = 1 { set %cx 120 set %cy 145 } if %czar = 2 { set %cx 320 set %cy 145 } if %czar = 3 { set %cx 120 set %cy 190 } if %czar = 4 { set %cx 320 set %cy 190 } if %czar = 5 { set %cx 120 set %cy 245 } if %czar = 6 { set %cx 320 set %cy 245 } if %czar = 7 { set %cx 120 set %cy 300 } if %czar = 8 { set %cx 320 set %cy 300 } set %akcja pisz return sub pisz if %akcja <> pisz || %main <> #true return set #lobjectid %pioro event macro 17 repeat until #contsize = 550_400 && #CONTNAME = generic_gump if #contposx <> 0 && #contposy <> 0 { set #contposx 0 set #contposy 0 } click 460 350 key back key back wait 2s repeat until #contsize = 550_400 && #CONTNAME = generic_gump msg %ile $ if #contposx <> 0 && #contposy <> 0 { set #contposx 0 set #contposy 0 } click %x %y wait 2s repeat until #contsize = 550_400 && #CONTNAME = generic_gump if #contposx <> 0 && #contposy <> 0 { set #contposx 0 set #contposy 0 } click %cx %cy set %akcja journal set %jindex #jindex return sub sprawdz set #lpc %hi if %1 = raz { menu delete krag menu delete tkrag menu delete czar menu delete tczar menu delete eile menu delete pioro menu delete zwoje menu delete tekst menu delete ziolka gosub combo_krag gosub combo_czar ;---------otwieranie pojemnikow-------------------- finditem CKF_ZJF C_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { set #lobjectid #findid event macro 17 ; click #CONTPOSX + 110 #CONTPOSY + 170 ; wait 10 } wait 10 } } ;---------------ile zwoi----------------- gosub czstandard menu text ile 5 60 Ile zrobic? menu edit eile 110 55 30 %ile ;--------szukanie piora------------ finditem pbg C_ if #findkind <> -1 { if %pioro <> #findid set %pioro #findid gosub czgreen menu delete pioro menu text pioro 5 80 Pioro: OK } else { gosub czred menu text pioro 5 80 Pioro: Brak set #menubutton STOP } ;-------------szukanie czystych zwoji----------------- finditem MMF C_ if #findkind <> -1 { if #findstack = 99 menu delete zwoje gosub czgreen menu text zwoje 90 80 Zwoje: #findstack } else { gosub czred menu text zwoje 90 80 Zwoje: Brak set #menubutton STOP } ;-----------------statystyka set %pstworzyl ( %stworzyl * 100 ) / ( %stworzyl + %zniszczyl ) set %pstworzyla ( %stworzyl * 100 ) % ( %stworzyl + %zniszczyl ) set %pstworzylb %stworzyl + %zniszczyl set %pzniszczyl ( %zniszczyl * 100 ) / ( %stworzyl + %zniszczyl ) set %pzniszczyla ( %zniszczyl * 100 ) % ( %stworzyl + %zniszczyl ) set %pzniszczylb %stworzyl + %zniszczyl gosub czgreen menu text tekst 5 100 +: %stworzyl -> %pstworzyl , % +-1% gosub czstandard menu text tekst 5 120 -: %zniszczyl -> %pzniszczyl , % +-1% ;-------------szukanie ziolek----------------- for %i 1 8 set %ziolo . %i 0 finditem KZF_MZF_WZF_JUF_JZF_SZF_RZF_KUF C_ ;czosnek, mandra, wilcze, krwawy, zenszen, siarka, pajecze, perly if #findkind <> -1 { for #findindex 1 #findcnt { if #findtype = KZF set %ziolo1 #findstack if #findtype = MZF set %ziolo2 #findstack if #findtype = WZF set %ziolo3 #findstack if #findtype = JUF set %ziolo4 #findstack if #findtype = JZF set %ziolo5 #findstack if #findtype = SZF set %ziolo6 #findstack if #findtype = RZF set %ziolo7 #findstack if #findtype = KUF set %ziolo8 #findstack } } for %i 1 8 { if %ziolo . %i = 99 menu delete ziolka } gosub czstandard menu text ziolka 5 140 czo: menu text ziolka 5 155 man: menu text ziolka 5 170 wil: menu text ziolka 5 185 krw: menu text ziolka 90 140 zen: menu text ziolka 90 155 sia: menu text ziolka 90 170 paj: menu text ziolka 90 185 per: menu text ziolka 40 140 %ziolo1 menu text ziolka 40 155 %ziolo2 menu text ziolka 40 170 %ziolo3 menu text ziolka 40 185 %ziolo4 menu text ziolka 120 140 %ziolo5 menu text ziolka 120 155 %ziolo6 menu text ziolka 120 170 %ziolo7 menu text ziolka 120 185 %ziolo8 set #lpc %low return sub start ; display ok %krag %czar menu get krag if #menures <> N/A || #menures <> 0 set %krag #menures menu get czar if #menures <> N/A || #menures <> 0 set %czar #menures ; display ok %krag %czar #menures menu getnum eile if #menures <> N/A set %ile #menures if %ile > 50 set %pile %ile - 50 if %krag = N/A || %krag > 8 { gosub czred set #menubutton STOP menu text tkrag 5 10 KRAG: } if %czar = N/A || %czar > 8 { gosub czred set #menubutton STOP menu text tczar 5 30 CZAR: } menu delete krag menu delete czar gosub czstandard menu text tkrag 60 10 %nkrag . %krag menu text tczar 60 30 %nczar . %czar set %akcja krag return sub pause click 190 115 repeat if #contsize = 380_200 { click 185 165 click #contposx + 185 #contposy + 165 } set %akcja journal gosub journal until #menubutton = SPRAWDZ || #menubutton = STOP set %akcja sprawdz return sub stop set %stworzyl 0 set %ile 1 set %zniszczyl 0 set %tempkrag N/A set %tempczar N/A menu delete tkrag menu delete krag menu delete tczar menu delete czar menu delete ile menu delete eile for %i 1 10 { if #contsize = 380_200 { click 185 165 click #contposx + 185 #contposy + 165 } } set %akcja sprawdz return sub journal if %akcja <> journal return set %ji #jindex - %jindex for %i 1 %ji { scanjournal %i if Stworzyl in #journal { deletejournal %i set %stworzyl %stworzyl + 1 set %ile %ile - 1 gosub sprawdz if %ile = 0 { sound %koniecwav set #menubutton STOP } if %ile = %pile && %pile > 0 { set %pile %ile - 50 set %akcja pisz } set %jindex #jindex break } if Nie_udalo in #journal { deletejournal %i set %zniszczyl %zniszczyl + 1 gosub sprawdz set %jindex #jindex break } ; if Potrzebujesz in #journal ; { ; deletejournal %i ; gosub sprawdz ; set #menubutton STOP ; break ; } } return